package com.sun.androidexerciseproject.function.util;


import com.orhanobut.logger.Logger;

import org.apache.commons.codec.binary.Base64;

/**
 * Created by Steven on 2017/2/15 0015.
 */

public class CipherTest {
    public static final String CONTENT = "test for cipher test";

//    public static void main(String[] args) {
//        base64Test();
//    }

    public static void base64Test() {
        byte[] data = Base64.encodeBase64(CONTENT.getBytes());
        Logger.d("base64Test encrypt data = " + new String(data));
        byte[] output = Base64.decodeBase64(data);
        Logger.d("base64Test decrypt output = " + new String(output));
    }
}
